import request from '@/utils/request'

const BASE_URL = "/admin/hosp/hospitalSet"

export default {
    // 获取分页数据
    getHospSetList(current, limit, searchObj) {
        return request({
            url: BASE_URL + `/findPageHospSet/${current}/${limit}`,
            method: 'post',
            data: searchObj
        })
    },

    // 根据id删除
    deleteHospSet(id) {
        return request({
            url: BASE_URL + `/${id}`,
            method: 'delete'
        })
    },
    // 批量删除
    batchDeleteHospSet(idList) {
        return request({
            url: BASE_URL + `/batchRemove`,
            method: 'delete',
            data: idList
        })
    },
    // 改变锁定状态
    lockHospitalSet(id, status) {
        return request({
            url: BASE_URL + `/lockHospitalSet/${id}/${status}`,
            method: 'put',
        })
    },

    // 根据id获取医院设置
    getHospSet(id) {
        return request({
            url: BASE_URL + `/getHospSet/${id}`,
            method: 'get',
        })

    },
    // 添加医院设置
    saveHospSet(hospitalSet) {
        return request({
            url: BASE_URL + `/saveHospitalSet`,
            method: 'post',
            data: hospitalSet
        })
    },

    // 修改医院设置
    updateHospSet(hospitalSet) {
        return request({
            url: BASE_URL + `/updateHospitalSet`,
            method: 'post',
            data: hospitalSet
        })
    }

}